Skip to content

Query: Adds new QueryFeature and QueryInfo fields for embedding parameters#5875

Merged
neildsh merged 3 commits into
mainfrom
users/ndeshpan/genEmbeddingsQueryInfo
May 18, 2026
Merged

Query: Adds new QueryFeature and QueryInfo fields for embedding parameters#5875
neildsh merged 3 commits into
mainfrom
users/ndeshpan/genEmbeddingsQueryInfo

Conversation

@neildsh
Copy link
Copy Markdown
Contributor

@neildsh neildsh commented May 17, 2026

Description

Adds the plumbing required for the upcoming GenerateEmbeddings query feature, which lets the gateway return query plans that contain parameterized embeddings (used by hybrid search).

Changes:

  • QueryFeature.cs — adds a new GenerateEmbeddings = 1 << 17 flag to the internal QueryFeatures enum so the SDK can advertise / detect support for embedding-parameterized query plans.
  • QueryInfo.cs — adds a new EmbeddingParameterMap (Dictionary<string, string>, serialized as embeddingParameterMap with NullValueHandling.Ignore) and a HasEmbeddingParameters convenience accessor on the internal QueryInfo model so query plans containing the new field round-trip correctly. Existing query plans without the field deserialize unchanged.
  • QueryPartitionProviderTests.cs — adds two new cases to TestPartitionedQueryExecutionInfoDeserialization:
    1. A non-hybrid QueryInfo plan with an embeddingParameterMap, validating the new field round-trips through QueryPartitionProvider.ConvertPartitionedQueryExecutionInfo.
    2. A HybridSearchQueryInfo plan whose component QueryInfos each carry an embeddingParameterMap, validating the field round-trips when nested inside hybrid-search component query infos.
  • Style fix — removes a duplicate blank line introduced near the new property to satisfy SA1507.

No public API surface change — both QueryFeatures and QueryInfo are internal in the released package. No SupportedQueryFeatures bitmask is flipped in this PR, so there is no behavior change for existing customer workloads on upgrade.

Type of change

  • New feature (non-breaking change which adds functionality)

Closing issues

N/A

Changelog

  • I have added a changelog entry under ### Unreleased in changelog.md for the user-facing impact of this change.
  • No changelog entry is required because this PR is one of: documentation-only, test-only, CI / build-only, or a pure internal refactor with no observable customer impact.

If the second box is checked, briefly justify here:

Internal-only plumbing. QueryFeatures and QueryInfo.EmbeddingParameterMap are both internal types in the released package. This PR does not add GenerateEmbeddings to any SupportedQueryFeatures bitmask, and the new property uses NullValueHandling.Ignore so query plans that don't include embeddingParameterMap deserialize identically to before. There is no
customer-observable behavior change on upgrade.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 2026

📝 Changelog reminder (non-blocking)

This PR touches shipped source but does not appear to update the
corresponding changelog.md.

Touched (and missing entry for):

  • Microsoft.Azure.Cosmos/src/** ⇒ expected an entry in changelog.md (### Unreleased)

How to decide

Use the rubric in .github/copilot-instructions.md ("Changelog
classifier") or in CONTRIBUTING.md ("Changelog entry"). Quick
version:

  • Customer-observable change (behavior, perf, memory, API) ⇒ add an entry, even if the PR is [Internal].
  • Test-only / CI-only / doc-only / pure-internal-refactor with zero customer-observable effect ⇒ no entry, add the no-changelog-needed label to silence this check.
  • Unsure? Default to adding a one-line entry under #### Other Changes. Reviewer will adjust.

This check is non-blocking — merge is not gated on it. The
reviewer is responsible for the final classification.

@neildsh neildsh added QUERY auto-merge Enables automation to merge PRs labels May 18, 2026
@neildsh neildsh enabled auto-merge (squash) May 18, 2026 02:48
@neildsh neildsh merged commit 85a417e into main May 18, 2026
35 checks passed
@neildsh neildsh deleted the users/ndeshpan/genEmbeddingsQueryInfo branch May 18, 2026 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Enables automation to merge PRs QUERY

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants